<extend name="Public/base"/>
<block name="content">
<h3>配置管理</h3>
<div class="panel panel-default">
	<div class="panel-heading"><{$info['id']?'编辑':'新增'}>配置专辑</div>
 	<div class="panel-body">       	        	
    	<form action="<{:U()}>" method="post" class="form-horizontal">
    		<div class="form-group">
    			<label class="col-sm-2 control-label">配置标识</label>
    			<div class="col-sm-2">
    				<input type="text" class="text form-control" name="name" value="<{$info.name|default=''}>">
    			</div>
    			<p class="help-block">用于C函数调用，只能使用英文且不能重复</p>    		
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">配置标题</label>
    			<div class="col-sm-2">
    				<input type="text" class="text form-control" name="title" value="<{$info.title|default=''}>">
    			</div>
    			<p class="help-block">用于后台显示的配置标题</p>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">排序</label>
    			<div class="col-sm-1">
    				<input type="text" class="text form-control" name="sort" value="<{$info.sort|default=0}>">    				
    			</div>
    			<p class="help-block">用于分组显示的顺序</p>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">配置类型</label>
    			<div class="col-sm-2">
    				<select name="type" class="form-control">
    					<volist name="Think.config.CONFIG_TYPE_LIST" id="type">
    						<option value="<{$key}>"><{$type}></option>
    					</volist>
    				</select>    				
    			</div>
    			<p class="help-block">系统会根据不同类型解析配置值</p>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">配置分组</label>
    			<div class="col-sm-2">
    				<select name="group" class="form-control">
    					<option value="0">不分组</option>
    					<volist name="Think.config.CONFIG_GROUP_LIST" id="group">
    						<option value="<{$key}>"><{$group}></option>
    					</volist>
    				</select>    				
    			</div>
    			<p class="help-block">配置分组 用于批量设置 不分组则不会显示在系统设置中</p>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">配置值</label>
    			<div class="col-sm-3">
    				<textarea name="value" class="form-control"><{$info.value|default=''}></textarea>   				
    			</div>
    			<p class="help-block">配置值</p>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">配置项</label>
    			<div class="col-sm-3">
    				<textarea name="extra" class="form-control"><{$info.extra|default=''}></textarea>   				
    			</div>
    			<p class="help-block">如果是枚举型 需要配置该项</p>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label">说明</label>
    			<div class="col-sm-3">
    				<textarea name="remark" class="form-control"><{$info.remark|default=''}></textarea>    				
    			</div>
    			<p class="help-block">配置详细说明</p>
    		</div>
    		<div class="form-actions">
    			<input type="hidden" name="id" value="<{$info.id|default=''}>">
    			<div class="col-sm-4 col-sm-offset-2">
          			<button type="submit" class="btn btn-primary">提交</button>
          			<button type="button" class="btn btn-danger" onclick="javascript:history.back(-1);return false;">取消</button>
       			</div>
       		</div>
    	</form>
	</div>
</div>													

</block>

<block name="script">
	<script type="text/javascript">
		highlight_subnav("<{:U('Config/group')}>","<{:U('Config/index')}>");
		$("[name='type']").val("<{$info.type|default = 0}>");
		$("[name='group']").val("<{$info.group|default = 0}>");
		//导航高亮
		$('.subMenu').find('a[href="<{:U('Config/group')}>"]').addClass('active').find('i').addClass('icon-long-arrow-right');
	</script>
</block>
